FUNCTION
require_not_empty
Asserts that a list is non-null and non-empty.
Parameters
- value — the list to be checked.
- message — the message for the exception to be thrown if the list is
nullor empty
Returns
the passed value, but with type cast from list<T>? to list<T>
Throws
exception— if the provided list isnullor empty
Since
0.9.0
Asserts that a set is non-null and non-empty.
Parameters
- value — the set to be checked
- message — the message for the exception to be thrown if the set is
nullor empty
Returns
the passed value, but with type cast from set<T>? to set<T>
Throws
exception— if the provided set isnullor empty
Since
0.9.0
Asserts that a map is non-null and non-empty.
Parameters
- value — the map to be checked
- message — the message for the exception to be thrown if the map is
nullor empty
Returns
the passed value, but with type cast from map<K,V>? to map<K,V>
Throws
exception— if the provided map isnullor empty
Since
0.9.0
function require_not_empty<T>(value: T?, [message: text]): TAsserts that a value is non-null.
Parameters
- value — the nullable value to be checked
- message — the message for the exception to be thrown if the value is
null
Returns
the passed value, but with type cast from T? to T
Throws
exception— if the provided value isnull
Since
0.9.0
© 2026 Chromia